package com.example.huaxindemo2.service.impl;



import com.example.huaxindemo2.entity.M002;
import com.example.huaxindemo2.mapper.M002Mapper;
import com.example.huaxindemo2.service.Pr10501Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

import java.util.List;

@Service
public class Pr10501ServiceIpml implements Pr10501Service {
    @Autowired
    private M002Mapper m002Mapper;
    @Override
    public void pr10501(Model model,int m00201) {

        M002 m002=
                m002Mapper.selectnumber(m00201);
        if(m002Mapper.selectnumber(m00201)==null){
            model.addAttribute("M101004E","“M101004E：该商品编号不存在。");
            model.addAttribute("m002",new M002());
        }else {
            model.addAttribute("m002",m002);
        }
    }
}
